package com.guli.gulimall.member.controller;


import com.guli.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jinxinmiao
 * @version 1.0.0
 * @ClassName HellowController
 * @Description TODO
 * @createTime 2022年04月20日 22:38:23
 */
@RestController
@RequestMapping("/hello")
@RefreshScope
public class HelloController {

    @Value("${person.name}")
    private String name;

    @Value("${person.age}")
    private Integer age;

    @RequestMapping("/getMsg")
    public R getMsg(){
        return R.ok().put("name",name).put("age",age);
    }
}
